require "skynet.manager"
local skynet = require "skynet"

local gameName = "paodekuai"
local Command = require(gameName..".Command")
local Message = require(gameName..".Message")
local Objects = require "Objects"



math.randomseed(tostring(os.time()):reverse():sub(1, 6))
g_objects = Objects.new()


function init()	

	local message = Message.new()
	local command = Command.new(message)
	-- g_objects:add(message)
	-- g_objects:add(command)
	-- g_objects:hotfix(gameName)
	skynet.dispatch("lua", message:dispatch())
end

skynet.start(function()
	init()
	skynet.register(gameName)
end)